import utils from '../class/utils/index.js'

import gameData from '../class/gameData.js'

export default class GameLoadingControl extends Laya.Script {
  constructor () {
    super()
  }

  onEnable () {
    // 初始化获取Laya节点
    this.initLayas()
  }

  // 这个函数中才可以读取场景的params
  onMounted () {
    console.log(this.owner.params)
  }

  // 初始化获取Laya节点
  initLayas () {
    this.layas = {}
    this.layas.box = this.owner.getChildByName('box')
    this.layas.gameTitle = this.layas.box.getChildByName('gameTitle')
    this.layas.mapTitle = this.layas.box.getChildByName('mapTitle')
    this.layas.loadingText = this.layas.box.getChildByName('loadingText')
  }
}